home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 007 / simcode.arc / README < prev    next >
Text File  |  1985-02-14  |  39KB  |  991 lines

  1. SIMTERM Instructions                                Page: 1
  2.  
  3.  
  4. 1.   Introduction 
  5.  
  6. Feel free to make copies of this program. There is no restriction on the 
  7. distribution as long as the copyright notices are left on the source and 
  8. that there is no charge for the distribution. This program is made 
  9. available to users of IBM-PCs (and compatibles since I really like the 
  10. COMPAQ/PLUS). No guarantees are made or implied. If you have any 
  11. questions or suggestions, please give me a call and I will try to answer 
  12. them. A recent acquisition of an interrupt driven communication driver 
  13. from the University of British Columbia Computer Centre has enabled me 
  14. to remove the requirement that you have the IBM Async Communications 
  15. Support package which included a driver I used to use. This version of 
  16. SIMTERM is therefore self-contained and requires no other software to 
  17. run. Have fun using it and **HAPPY COMPUTING**.
  18.  
  19. This  floppy contains all the software for the terminal simulator for 
  20. the IBM  PC.  The main function of this program is to provide a 
  21. reasonable terminal simulation on the IBM PC of an HP-like terminal to a 
  22. UNIX(TM) system. The file `simterm.exe' is the load module and when 
  23. invoked, assumes a default of 1200 baud, 1 stop bit, no parity, and flow 
  24. control (XON/XOFF). The interrupt level of the communications line is 
  25. also set to the highest level to ensure that incoming characters are 
  26. processed as soon as they arrive. The only programs that have to be on 
  27. the floppy are SIMTERM.EXE, HELP.TXT, and MENUS. If you have a VENTEL or 
  28. a Hayes modem, the file BOARDS can be copied over as a starter for a 
  29. list of BBSs. The BOARDS file is set up for a VENTEL autodialer. The 
  30. dialing strings will have to be changed to conform for the Hayes 
  31. standard.
  32.  
  33. If you have DOS 2.0, put SIMTERM.EXE, HELP.TXT, BOARDS and MENUS in a 
  34. subdirectory called \simterm. That way, if you change directories during 
  35. a SIMTERM session, by specifying a path for any type of file transfer, 
  36. SIMTERM will be able to find its way back to these two important files. 
  37. If you don't have DOS 2.0, then just IGNORE the occasional "directory 
  38. not found" messages, they're harmless.
  39.  
  40. 2. Command Line Parameters
  41.  
  42. Optional parameters on the command  line will override the defaults as 
  43. follows:
  44.  
  45.  `-a'     put the simulator into the ADM3a emulation mode for those 
  46.           systems which don't support TERMCAP.
  47.  
  48.  `-b'     Causes SIMTERM to assume you are using a monochrome display, 
  49.           even though you may not really have one.
  50.  
  51.  `-B'     will cause the transmit and receive buffers to be cleared when 
  52.           a BREAK (End key) is sent. This is mainly for high baud rate 
  53.           lines where there is still junk in the buffers that you don't 
  54.           want to see.
  55.  
  56.  `-cn'    specifies which COMx device you want to use. The default is 1 
  57.           (use COM1).
  58.  
  59.  
  60.  
  61. Copyright @ 1982,1984                 Jim & Eric Holtman
  62.  
  63.  
  64.  
  65.  
  66.  
  67. SIMTERM Instructions                                Page: 2
  68.  
  69.  
  70.  `-d'     Enter direct connect mode. SIMTERM won't wait for carrier 
  71.           detect. Use this option if you're connected directly to the 
  72.           remote, with no modem. You can also use this option when 
  73.           SIMTERM seems to hang at startup, with the "Establish 
  74.           communications link" message. This may be be case with Hayes 
  75.           modems if you don't have them optioned to raise the carrier 
  76.           detect.
  77.  
  78.  `-D'     When this flag is used, SIMTERM will ignore DEL (127 Ascii) 
  79.           characters, and the character immediately following the DEL. 
  80.           We use it because we have a noisy line.
  81.  
  82.  `-e'     specifies that the EPSON printer does not have the GRAFTRAX 
  83.           option. Therefore when using `ibmpr' to route stuff to the 
  84.           printer, the code will simulate underlining, subscripts, and 
  85.           superscripts. Default is  an EPSON with GRAFTRAX.
  86.  
  87.  `-E'     Set the EMACS mode for the cursor control keys so that when 
  88.           EMACS is entered, the UP(^P), DOWN(^N), LEFT(^B), and 
  89.           RIGHT(^F) characters are sent.
  90.  
  91.  `-g'     Causes SIMTERM to assume you are using a graphics display, 
  92.           even though you may not really have one. 
  93.  
  94.  `-h'     SIMTERM will operate in the `half-duplex' mode; i.e., it will 
  95.           echo the characters the user types since the host system does 
  96.           not.
  97.  
  98.  `-in'    specifies the IRQ (interrupt request level) to be used. 
  99.           Default is 4, but some boards (like the Quadram) use IRQ3 for 
  100.           COM2, so in this case SIMTERM would have to be invoked with 
  101.           the parameters `-c2 -i3' to set it up correctly.
  102.  
  103.  `-I'     This will set the async port as the highest priority if 
  104.           specified as `-I'. If specified as `-In', the priority levels 
  105.           will not be affected. Default is to set the comm line as the 
  106.           highest priority to avoid `Data Overruns'.
  107.  
  108.  `-m'     Tells SIMTERM that you have a Hayes modem instead of the 
  109.           default VenTel modem. This will enable SIMTERM to use the 
  110.           directory dialing features (Alt-V)
  111.  
  112.  `-M'     Redefines the cursor control keys compatible with a set of 
  113.           UNIX-like utilities on a PR1ME computer at UofVa.
  114.    
  115.  `-nxxxx' if you have a Ventel or Hayes modem, this option will 
  116.           automatically dial the number when the simulator is started.
  117.  
  118.  `-o'     turns off the error messages caused by communications line; 
  119.           e.g., framing error and invalid parity. 
  120.  
  121.  `-px'    specifies  the parity where  `n'-none,  `o'-odd,  `e'-even, 
  122.           `m'-mark,  and `s'-space.
  123.  
  124.  `-PFfil' Use file "file" as a script source file (see SCRIPTS below)
  125.  
  126.  
  127. Copyright @ 1982,1984                 Jim & Eric Holtman
  128.  
  129.  
  130.  
  131.  
  132.  
  133. SIMTERM Instructions                                Page: 3
  134.  
  135.  
  136.  
  137.  `-PDscr' Execute script "scr" upon start-up (see SCRIPTS below)
  138.  
  139.  `-r'     this causes SIMTERM to wait for the horizontal retrace when 
  140.           writing to the screen. If you notice `sparkles' on your 
  141.           graphics monitor, invoke SIMTERM with this option and it 
  142.           should clear up.
  143.  
  144.  `-snnnn' specifies `nnnn' as the baud rate (e.g., -s300).
  145.  
  146.  `-Sn'    specifies the number of stop bits (1 or 2)
  147.  
  148.  `-vxxxx' specifies the file (xxxx) to be used when the Alt-V options is 
  149.           invoked to dial BBS. The full path name of the file should be 
  150.           specified.
  151.  
  152.  `-wn'    set the word length to `n'. Default is 8 (7 data + 1
  153.           parity).
  154.  
  155.  `-xn'    this option will turn off the XON/XOFF flow control. The 
  156.           program will send an XOFF when the receive buffer is almost 
  157.           full and then an XON when it has emptied out. It will also 
  158.           recognize an XOFF from the host to stop transmitting and then 
  159.           and XON to start again. 
  160.  
  161.  `-kfilename'  will  read in the file `filename'  to  initialize the 
  162.           function  keys. The file is of the form 
  163.  
  164.           n=string of chars
  165.  
  166.           where 0<=n<=9
  167.  
  168.           example
  169.            0=who^V
  170.            1=who|wc^V
  171.  
  172. If the string is terminated with a `^V' (chr(174) -- obtained by  
  173. holding down the `Alt' key and typing 174 on the key pad), a  `carriage 
  174. return' will be appended.
  175.  
  176.    For example:
  177.  
  178. If you want to run at 9600 baud, even parity, without waiting for 
  179. carrier detect
  180.                 simterm -s9600 -pe -d
  181.  
  182. If you want to use COM2 (and it requires IRQ3) at 300 baud and run 
  183. script "xyzzy" from file "scr2"
  184.  
  185.                 simterm -s300 -c2 -i3 -PFscr2 -PDxyzzy
  186.  
  187. If you are using a Hayes modem and want a number dialed when SIMTERM is 
  188. started, use the following command line:
  189.  
  190.                 simterm -m -d -n12145551212
  191.  
  192.  
  193. Copyright @ 1982,1984                 Jim & Eric Holtman
  194.  
  195.  
  196.  
  197.  
  198.  
  199. SIMTERM Instructions                                Page: 4
  200.  
  201.  
  202.  
  203. 3. Program Functions (Unix specifics)
  204.  
  205.  
  206. Once loaded, the program will use all available memory above the module 
  207. for save space for paging through previous output.   I have 256K on my 
  208. system and this provides about 20 pages (~500 lines) of saved text. The 
  209. TERMCAP entry for the terminal is in the file `termcap.ibm'. This should 
  210. either be added to your termcap library or the `shell' variable TERMCAP 
  211. should be set to it before trying to use any package that requires 
  212. cursor addressing.  The TERMCAP entry makes use of the fact that  `vi' 
  213. (and `curses') will use a special sequence to enter and leave the 
  214. control mode. The simulator uses these sequences to redefine the cursor 
  215. control keys so that can be used in that mode; e.g., in `vi' the "up 
  216. arrow" will send in a "k", while the "PgDn" will send in a "^D" to 
  217. scroll the display down, etc. For those of you who are running on UNIX 
  218. systems that use "terminfo", there is a file "terminfo.ibm" which has 
  219. the appropriate definitions.
  220.  
  221. Output to the printer can be initiated under program control with a 
  222. filter similar to `hp' which is used for HP terminals. The source file 
  223. for `ibmpr' (which is the filter that use on UNIX) is on the floppy. You 
  224. should compile this UNIX and then use for controlling output to the 
  225. printer. A typical use of this filter is:
  226.  
  227.           nroff -T37 file | ibmpr -p
  228.  
  229. The `-p' option says to route the output to the EPSON printer.  The `-i' 
  230. option will cause underlined text to come out in italics. The `-c' 
  231. option is used to invoke the compressed mode (132 characters/line).
  232.  
  233. If those escape sequences are output, they will be displayed 
  234. appropriately on the CRT and output to the printer correctly.
  235.  
  236.  
  237. 4. User Defined Function Keys 
  238.  
  239. There are 10 user definable functions keys that will send a  character 
  240. sequence of up to 30 characters. To display the current contents of the 
  241. keys, hold the `Alt' key down and type `='. To change the contents, hold 
  242. the `Alt' key and type `-' and follow directions. To invoke the 
  243. functions keys, hold down the `Alt' key and type the corresponding digit 
  244. (e.g., `Alt 3'). A user can define a file with the contents of the keys 
  245. and cause it to be read in with the `-k' option on the command line.
  246.  
  247. 5. Upload/Download (Unix Specific) 
  248.  
  249. This is used to transfer `text' files (ones that only contain  printable 
  250. ASCII and tabs) between the PC and the host. To remember which way the 
  251. data flow, just remember that the IBM PC looks `up' to UNIX, while UNIX 
  252. looks `down' on the PC. To move files between the PC and UNIX, hit 
  253. `Cntl-PgUp' to transfer PC->UNIX. Answer the prompts. Hit `Ctrl-PgDn' to 
  254. move from UNIX- >PC. As the transfer is taking place, a message will 
  255. indicate the # of bytes transferred. When going UNIX->PC, there will be 
  256. more bytes on the PC disk than on UNIX because of added `end-of-line' 
  257.  
  258.  
  259. Copyright @ 1982,1984                 Jim & Eric Holtman
  260.  
  261.  
  262.  
  263.  
  264.  
  265. SIMTERM Instructions                                Page: 5
  266.  
  267.  
  268. and `end-of-text' bytes. This can only be used to transfer TEXT files.
  269.  
  270. 6. Upload/Download (Straight ASCII & XMODEM) 
  271.  
  272. The program  can be used to connect to BBSs and any other  systems that 
  273. support async devices. To download a file to the PC, go through the 
  274. normal dialog on the BBS and then when it is waiting for you to hit 
  275. return to start the transfer, press Alt-C to open the `copy' file that 
  276. will receive the data. You will be put back to the original screen where 
  277. you can hit return. At the end of the data transfer, hit Alt-C to close 
  278. the copy file.
  279.  
  280. To upload a file from the PC to a BBS, again go through the  dialog to 
  281. setup the transfer and when the BBS is ready, press Alt-D to specify the 
  282. data file. This will then `dump' the file to the comm line. At then end 
  283. of the transfer, you may have to type in a control sequence to indicate 
  284. that you are done. This option will request a `delay' between characters 
  285. so that you do not overrun the receiving system. Use `0' for no delay; a 
  286. value of `1' is probably sufficient for most systems that can not handle 
  287. the normal baud rate. Experiment.
  288.  
  289. SIMTERM supports the XMODEM protocol for data transfer from a BBS. To 
  290. invoke this option, hit Alt-R to receive with XMODEM at the point that 
  291. the sender is ready. You will be prompted for the file to receive into 
  292. and then the PC will initiate the transfer of data. Transmitting with  
  293. XMODEM is invoked with Alt-T and prompts will follow.
  294.  
  295. 7. Script files
  296.  
  297. Script files are used to allow SIMTERM to do mindless interactive login 
  298. and other such sequences. A Scriptfile can be created by your favorite 
  299. word processor and SIMTERM will compile it for you, and save the 
  300. compiled version so you don't have to re-compile at each run. Script 
  301. files read much like English, so they are both easy to understand and 
  302. create.
  303.  
  304.      Script Commands Available 
  305.  
  306. Each of the following commands can appear in a script file. Note that 
  307. each separate command must be separated by a space, tab or newline. The 
  308. compiler ignores extra white-space, so you can have indenting, multiple 
  309. commands per line, or whatever you want. Syntax notes: "str" in the 
  310. following denotes a string constant delimited by quotes. A string can 
  311. have multiple words. To get a quote character into a constant, write it 
  312. as \". To get a backslash, write it as \\. Although one-word strings 
  313. need not have quotes, they should, so that they are not confused with 
  314. keywords (commands). Non-quoted strings generate warnings from the 
  315. compiler.
  316.  
  317.  
  318.  name "str" --- defines an entry point for the script that you can use 
  319.           to identify this part. I.e, if a "name whuxlb" appears in the 
  320.           file, then you can start running the script by using the name 
  321.           "whuxlb". (See "running scripts" below) If you choose "whuxlb" 
  322.           from the pop-up menu later, the script will start executing at 
  323.  
  324.  
  325. Copyright @ 1982,1984                 Jim & Eric Holtman
  326.  
  327.  
  328.  
  329.  
  330.  
  331. SIMTERM Instructions                                Page: 6
  332.  
  333.  
  334.           the statement immediately following the "name" statement.  
  335.  
  336.  send "str" --- sends the string to the remote computer, with a carriage 
  337.           return tacked onto the end. Some escapes can be placed into 
  338.           the string, as follows: an "\1" causes a one second pause when 
  339.           it is encountered. "\m" sends a carriage return. "\j" sends a 
  340.           line-feed. "\c" suppresses the carriage return that is 
  341.           normally tacked onto the end of a string. "\B" will cause a 
  342.           `break' to be sent on the comm line. "\onnn" will cause the 
  343.           octal equivalent of `nnn' to be sent; e.g., to send a `bell' 
  344.           (Ctrl-G), use \o007. Remember, though, you need to type TWO 
  345.           backspaces to get one, so these sequences should appear as 
  346.           \\1,\\m, etc in your file.   
  347.  
  348.  dial  "str" --- dials the string on a VenTel dialer. Obviously, if you 
  349.           don't have a ventel, don't use this command (Fake it with 
  350.           "send"). For example, to dial "3395" on a Hayes, put a line 
  351.           like "send ATDT3395" in your file.
  352.  
  353.  say "str" --- outputs "str" onto the screen, so that you can put tracer 
  354.           statements in the script.
  355.  
  356.  goto "str" --- branches to str. labels to be branched to must be 
  357.           followed by a colon. I.e. early in the script you have a line 
  358.           "label:" all by itself. Later, you can call "goto label" (no 
  359.           colon) to branch back up to the earlier statement
  360.  
  361.  gosub "str" --- like goto, but when a "return" statement is encountered 
  362.           later, the program branches BACK to the statement that follows 
  363.           the gosub. Gosubs may be nested.
  364.  
  365.  return --- returns from a "gosub" statement
  366.  
  367.  input "str" --- Prompts the user with "str", reads one line, and sends 
  368.           it to the remote computer.
  369.  
  370.  settime "str" --- sets the timeout value to "str" seconds. Default is 
  371.           fifteen.
  372.  
  373.  openlog "str" --- this will open the file "str" and log all data 
  374.           received at the terminal to the file in the same manner as if 
  375.           Alt-C had been pressed.
  376.  
  377.  closelog --- closes the log file opened by `openlog'
  378.  
  379.  toggle_tr --- toggles the `data terminal ready' lead; this effectively 
  380.           hangs up the phone and breaks the connection.
  381.  
  382.  quit     --- execution is returned to SIMTERM. There is an understood 
  383.           "quit" at the end of file  
  384.  
  385.  
  386.  
  387. The Logical Operators (IF/CASE)
  388.  
  389.  
  390.  
  391. Copyright @ 1982,1984                 Jim & Eric Holtman
  392.  
  393.  
  394.  
  395.  
  396.  
  397. SIMTERM Instructions                                Page: 7
  398.  
  399.  
  400. Besides the COMMANDS, the script compiler recognizes two logical 
  401. operators, the if/else statement and the case. 
  402.  
  403.                     IF SYNTAX
  404.  
  405. if "str" stmnt1 else stmnt   OR     if "str" {
  406.                                              stmnt
  407.                                              stmnt
  408.          OR                                    .
  409.                                                .
  410. if "str" stmnt1 (no ELSE)                   } else stmnt 
  411.         
  412.                                           OR   } else {
  413.                                                   stmnt
  414.                                                     .
  415.                                                   }  
  416.  
  417. When encountered, the program will scan the output from the remote 
  418. computer until either it finds "str" or it times out. If it finds "str", 
  419. stmnt1 is executed, if it times out, stmnt2 is executed. Execution then 
  420. drops down to the next statement, unless the stmnt1 or stmnt2 contained 
  421. a goto or gosub or quit. 
  422.  
  423. stmnt1 or stmnt2 may be either single commands from above, or multiple 
  424. commands delimited by { and } (note white space around the brackets. If 
  425. the else following if the is missing, then execution falls to the next 
  426. statement. Note that ifs may be nested. For example
  427.      
  428.      if "str" dial "4244" else if "str2" dial "4324"
  429.  
  430. Be aware, however, that input is only scanned once, so if "str2" appears 
  431. before "str" in the preceeding example, both tests will fail!!
  432.  
  433.                          CASE SYNTAX
  434.  
  435. The case statement is like multiple simultaneous IFs. It allows you to 
  436. set up a few strings to be searched for SIMULTANEOUSLY, with an action 
  437. specified to be executed if and when one of the strings is found. Syntax 
  438. is
  439.  
  440.      case
  441.      str1: action
  442.      str2: action
  443.           .
  444.           .
  445.      otherwise action
  446.      caseend
  447.  
  448. Action can be either a single statement (say, send, dial, or even an if, 
  449. or another case.) or multiple statements surrounded by { and } (like the 
  450. if clause.). For example, if you have
  451.  
  452.      case
  453.      eric: dial "eric's #"
  454.      holtman: dial "another #"
  455.  
  456.  
  457. Copyright @ 1982,1984                 Jim & Eric Holtman
  458.  
  459.  
  460.  
  461.  
  462.  
  463. SIMTERM Instructions                                Page: 8
  464.  
  465.  
  466.      caseend
  467.  
  468. and the input is "djsfhj gfjg eric holtman" then "eric's #" will be 
  469. dialed and the case will quit. Note that "holtman" is not matched since 
  470. a case statement executes as soon as any of the strings is found.
  471.  
  472.            Script Examples
  473.  
  474. Call number 3395, wait for "login" prompt. If I get it, gosub to a login 
  475. procedure. If I don't then say something, then quit. The login 
  476. subroutine will send my id, then prompt for my password, send it, then 
  477. return.
  478.  
  479.      name example
  480.      dial 3395
  481.      if "login" gosub "subr" else {
  482.           say "3395 didn't answer"
  483.           quit
  484.      }
  485.      quit
  486.      subr:
  487.           send "id3434"
  488.           input "Your password, sire? "
  489.           return
  490.  
  491. Note that after the "return" the next statement to be executed will be 
  492. "quit".
  493.  
  494.  
  495.        Compiling Scripts
  496.  
  497. To use the example above, copy it out to a file called, for example, 
  498. "prog". Then invoke SIMTERM with a -PFprog flag, like so: "simterm -
  499. PFprog". This tells SIMTERM that you wish to use scripts from the file 
  500. "prog". If no -PF flag appears, SIMTERM will read the file "scripts" 
  501. which is where you may want to keep compiled scripts. After SIMTERM gets 
  502. running, type an Alt-L. This informs SIMTERM that you wish to use a 
  503. script. It will examine the file "prog" and determine that it needs to 
  504. be compiled. Tell SIMTERM what file you want to put the compiled stuff 
  505. in, then sit back and watch for error messages. After it compiles, hit 
  506. return and proceed to the next step. Remember the file name you used for 
  507. the compiled scripts, and use it next time you run SIMTERM, so that you 
  508. don't have to recompile everything again.
  509.  
  510.  
  511.           Using a script
  512.  
  513. After you type Alt-L, or after the compile is finished, a menu of all 
  514. "name" strings will pop up. If you're still using the example, only one 
  515. name ("example") will be there. Using the up and down arrows, make your 
  516. choice, then hit the space bar. SIMTERM will then execute your script 
  517. starting at that named point.
  518.  
  519. To execute a script from startup, use the -PD flag. For example, to run 
  520. script "example" from the file "prog.scr", type
  521.  
  522.  
  523. Copyright @ 1982,1984                 Jim & Eric Holtman
  524.  
  525.  
  526.  
  527.  
  528.  
  529. SIMTERM Instructions                                Page: 9
  530.  
  531.  
  532.  
  533.                simterm -PFprog.scr -PDexample
  534.  
  535. 8.  Functions Available from the Keyboard
  536.  
  537. All these functions can be accessed from the keyboard by typing the 
  538. appropriate character. If you forget the commands, Alt-H will bring up a 
  539. menu for you. Just follow the menu selection process until you find the 
  540. desired function. Note that the menu will tell you which key to use to 
  541. activate that function in the future. I.e., the menu has Alt-L next to 
  542. the script choice to remind you that you can use Alt-L instead of the 
  543. menus to activate the script functions. 
  544.  
  545.  
  546.  F1       Will `toggle' the display so that usually non-displayed 
  547.           control characters are displayed in reverse  video  using the 
  548.           upper case letter that they are equivalent to.
  549.  
  550.  F2       Will `print' the line that the cursor is positioned  at.
  551.  
  552.  F3       Send a BREAK
  553.  
  554.  F4       Will ask for the directory that you wish to list and then 
  555.           display the files.
  556.  
  557.  F8       Freezes the display above the cursor. Handy to save  some data 
  558.           on the upper portion so you can see it as  you do other 
  559.           commands. To `unfreeze', move the cursor to the top of the 
  560.           screen and hit F8.
  561.  
  562.  F9       turns on the row/column display at the bottom of  the screen 
  563.           so that you know where the cursor is  currently positioned.
  564.  
  565.  F10      Toggles XON/XOFF. A convenient way of stopping/restarting the 
  566.           output to the CRT when connected to a system that honors the 
  567.           XON/XOFF protocol for flow control.
  568.  
  569.  Alt-F1   Will terminate SIMTERM, but leave the DTR line high  so    OR     
  570.           that you can restart SIMTERM and pickup where you left  Alt-
  571.           255  off.
  572.  
  573.  Alt-F2   Terminate SIMTERM, and drop DTR so that the  modem  will hang 
  574.           up.
  575.  
  576.  Alt-F3   Toggles the DTR (data terminal ready) lead on the 
  577.           communications line. This is used to drop the carrier at the 
  578.           modem so that you can redial.
  579.  
  580.  Alt-F4   Toggles the graphics-mode. This will display characters with 
  581.           their parity bits so that the `graphics' characters of the PC 
  582.           (>127) are should. This is used on some of the BBSs.
  583.  
  584.  Alt-F5   Clears line 25 if it becomes cluttered.
  585.  
  586.  Alt-F6   Display various mode settings on line 25.
  587.  
  588.  
  589. Copyright @ 1982,1984                 Jim & Eric Holtman
  590.  
  591.  
  592.  
  593.  
  594.  
  595. SIMTERM Instructions                                Page: 10
  596.  
  597.  
  598.  
  599.  Alt-F7   Resets the communications software. In some instances an 
  600.           interrupt might be missed and leave the system in a state 
  601.           where it is expecting data that will not be sent. If you 
  602.           suspect this, try an Alt-F7 before rebooting the software to 
  603.           see if it breaks you out of the situation.
  604.  
  605.  Alt-C    Puts SIMTERM in a `capture' mode so that all  input a received 
  606.           over the communication line is logged to a disk file. Handy 
  607.           for picking up ASCII text from a system that does not support 
  608.           XMODEM. It will prompt you for a file name.
  609.  
  610.  Alt-D    Will `dump' a ASCII file on the PC to the comm line.  This is 
  611.           a way of `uploading' to a system that does not support XMODEM. 
  612.           You can also specify a delay to prevent overruns.
  613.  
  614.  Alt-E    Toggles the `vi' mode. Handy when you exit SIMTERM and then 
  615.           come back into it with UNIX still in `vi'. The mode should be 
  616.           TRUE to have the cursor keys work for `vi'.
  617.  
  618.  Alt-F    Enter the `local' line editting mode. This allows you to make 
  619.           corrections to a line and then reenter it. Use the cursor 
  620.           control keys to move to the line, `Ins' and `Del' to fixup the 
  621.           line and then hit return to reenter the line and leave the 
  622.           line edit mode.
  623.  
  624.  Alt-H    Display a `help' menu listing the defined function keys.
  625.  
  626.  Alt-L    Invoke the `script' processor
  627.  
  628.  Alt-R    Receive a file using the XMODEM protocol.
  629.  
  630.  Alt-T    Send a file using the XMODEM protocol.
  631.  
  632.  Alt-V    Will display a menu that is used with the `auto-dial' 
  633.           capability of the Ventel. Once in this menu, select the 
  634.           desired feature.
  635.  
  636.  Alt-=    Display the user defined function keys
  637.  
  638.  Alt--    Change a user defined function key
  639.  
  640.  Home     Goto top of file in "vi" (unix specific)
  641.  
  642.  Ins      Send the current line to remote (similar to the ENTER key on 
  643.           an HP-2621) OR if in "vi" toggle insert mode.
  644.  
  645.  Del      Clear display from cursor to bottom OR if in "vi" delete a 
  646.           character
  647.  
  648.  Arrows   Move through screen memory in the specified direction
  649.  
  650.  PgUp     Back up one page through memory
  651.  
  652.  PgDn     Go down one page in memory
  653.  
  654.  
  655. Copyright @ 1982,1984                 Jim & Eric Holtman
  656.  
  657.  
  658.  
  659.  
  660.  
  661. SIMTERM Instructions                                Page: 11
  662.  
  663.  
  664.  
  665.  Cntr+    Toggle output to printer
  666.    PrtSc
  667.  
  668.  Ctrl+    Download (Unix ---> IBM) 
  669.    PgDn
  670.  
  671.  Ctrl+    Upload (IBM ---> Unix)
  672.    PgUp
  673.  
  674.  
  675. 9.  Remote Control of SIMTERM
  676.  
  677. Certain sequences of characters, when received over the communications 
  678. line, will cause SIMTERM to execute certain functions, like clearing the 
  679. screen, moving characters, turning the printer on and off. In the 
  680. following descriptions ESC is Escape (ASCII 27), and Ctrl-X denotes the 
  681. character generated by holding down Ctrl and typing X. I.e. Ctrl-A is 
  682. ASCII 1. Note: in the descriptions "ESC H F" for example means ESCAPE, 
  683. capital H, capital F, with NO SPACES.  
  684.  
  685.  ESC A    -- move the cursor up one line
  686.  ESC B    -- move the cursor down one line
  687.  ESC C    -- move the cursor right one space
  688.  ESC D    -- move the cursor left one space
  689.  ESC d x  -- remote XMODEM download of a file. This sequence is followed 
  690.           the file name which is terminated with a ^Z (chr(26)).
  691.  ESC E    -- take SIMTERM out of INSERT mode
  692.  ESC F    -- remotely program a function key. After the F, send a number 
  693.           from 1 to 9 to indicate which key to program, or a 0 to 
  694.           program key 10. Everything following the numeral, up to, but 
  695.           not including a terminating Ctrl-Z is then stored in that 
  696.           function key. (See User Function Keys, above)
  697.  ESC H    -- moves cursor to top left of screen (HOME)
  698.  ESC K    -- clears the rest of the line, from cursor position over
  699.  ESC J    -- clears display from cursor to end of line, and all 
  700.           lines below the cursor
  701.  ESC L    -- inserts a line above the cursor by rolling bottom lines 
  702.           down. Bottom line of text is lost.   
  703.  ESC M    -- current line is deleted, lower lines scrolled up to close 
  704.           the gap
  705.  ESC P 1  -- turn on printer (Like Ctrl-PrtSc). Everything           
  706.           that now appears onscreen will be copied to the printer
  707.  ESC P 2  -- like P 1, but printer is put in COMPRESSED PRINT MODE.
  708.  ESC P E  -- like P 1, but printer is put in EMPHASIZED PRINT MODE.
  709.  ESC P i  -- doesn't turn printer on, just sets ITALICS mode. So, to 
  710.           print in ITALICS, first turn on printer (ESC P 1), then have 
  711.           the remote computer send this 
  712.  ESC P P  -- turn on printer, and set into PROPORTIONAL print mode.
  713.  ESC P 0  -- turn off printer. Screen is no longer copied to           
  714.           printer      
  715.  ESC Q    -- Enter INSERT mode. All subsequent characters will be 
  716.           inserted before the cursor on this line
  717.  ESC R    -- Deletes the character at current cursor position.
  718.  ESC T A  -- Cause SIMTERM to begin ADM3A simulation
  719.  
  720.  
  721. Copyright @ 1982,1984                 Jim & Eric Holtman
  722.  
  723.  
  724.  
  725.  
  726.  
  727. SIMTERM Instructions                                Page: 12
  728.  
  729.  
  730.  ESC T a  -- Cause SIMTERM to end ADM3A simulation
  731.  ESC T R  -- Cause SIMTERM to set up to play ROGUE, so that arrow keys 
  732.           work.
  733.  ESC T r  -- Cause SIMTERM to end rogue playing set up
  734.  ESC u x  -- remote XMODEM upload of a file. This sequence is followed 
  735.           by the file name which is terminated by ^Z (chr(26)).
  736.  ESC V S  -- Cause SIMTERM to set up for vi, so that arrows, Ins, Del, 
  737.           PgUp and PgDn do reasonable things in this Unix text editor 
  738.  ESC V s  -- End Vi mode
  739.  ESC [ x c  -- causes character 'c' to be printed x number of times, 
  740.           i.e. to print 27 B's, send ESC [ ESC B, since ESC has an ASCII 
  741.           value of 27.
  742.  ESC & d @  -- set the screen (and printer) back to NORMAL mode.
  743.  ESC & d B  -- set screen attribute to a value that equals BOLD on the 
  744.           printer (Actual screen color varies from monochrome to 
  745.           graphics monitor.) On the monochrome, this is REVERSE VIDEO, 
  746.           and on the printer, it is EMPHASIZED.
  747.  ESC & d D  -- set attribute to correspond to UNDERLINE on both the 
  748.           printer and display.
  749.  ESC & d H  -- set attribute to be SUPERSCRIPT on the printer and INTENSE 
  750.           mode on the display.
  751.  ESC & d L  -- set the attribute to be SUBSCRIPT on the printer and 
  752.           INTENSE UNDERLINED on the display.
  753.  ESC = y x  -- move cursor to position y,x: where y and x are the ASCII 
  754.           characters which equal the desired position plus 32. I.e. to 
  755.           move to position 3,3 send ESC = # #, since the ASCII value of 
  756.           # (35) minus 32 is 3
  757.  ESC ^    -- request ID. SIMTERM will send back the string "IBM PC" 
  758.           terminated by a newline. This is handy for inclusion in your 
  759.           `.profile' to set your terminal type. By having
  760.                      echo 'terminal type?\033^\c'
  761.                      read type
  762.           in the file you can determine if SIMTERM is acting as the 
  763.           terminal.
  764.  
  765. There are probably other undocumented `escape' sequences. To find out 
  766. what they might be, read the code in ESCPAR.PAS.
  767.  
  768.  
  769. 10.  XMODEM Under UNIX
  770.  
  771. When using XMODEM with a UNIX system, the programs `xrecv.c' and 
  772. `xtrans.c' should be uploaded and compiled on the host. These programs 
  773. are setup for the System V release of UNIX and may need rework if used 
  774. on other systems (e.g., Berkeley). To send a file from the PC->UNIX, 
  775. type `xrecv filename' on UNIX and when the prompt comes up to start 
  776. transmission, hit Alt-T and follow the instructions.
  777.  
  778. To send a file from UNIX->PC, type `xtrans filename' on UNIX and when 
  779. the prompt comes up to set up the receive, hit Alt-R and follow the 
  780. instructions.
  781.  
  782. If you are sending ASCII Text files, invoke the `xrecv'/`xtrans' with 
  783. the `-t' argument so that conversion is done between the DOS and UNIX 
  784. conventions. The XMODEM protocol using the `-t' option is the safest way 
  785.  
  786.  
  787. Copyright @ 1982,1984                 Jim & Eric Holtman
  788.  
  789.  
  790.  
  791.  
  792.  
  793. SIMTERM Instructions                                Page: 13
  794.  
  795.  
  796. to transfer text files between systems since checks are made for 
  797. successful transmission and any errors introduced by noisy lines will be 
  798. filtered out.
  799.  
  800. MULTIPLE REMOTE TRANSFERS OF FILES
  801.  
  802. As an optional feature, there is a remote (-r) option that will cause 
  803. the upload/download to be invoked automatically on the PC end. For 
  804. example, if you want to upload the file `\tmp\xyz' on the PC to the file 
  805. `tempxx' on UNIX, the following would be issued;
  806.  
  807.              xrecv -r tempxx /tmp/xyz
  808.  
  809. Notice that `/' instead of `\' is used as the file name separator for 
  810. the PC file name. The command (xrecv/xtrans) will translate the `/' to 
  811. `\'. If you really want to use `\', then put in two of them, due to the 
  812. way the SHELL processes parameters. This feature is useful for 
  813. transferring a large number of file automatically. A SHELL script can be 
  814. created with xrecv/xtrans commands to transfer a large number of files. 
  815. This transfer will take place automatically.
  816.  
  817. Note:  if  the  `-d'  option is given to  either  program,  the  
  818. following will  occur.  xrecv  leaves a running commentary on the 
  819. connection  status in "xr.err",  and xtrans leaves a corresponding file 
  820. called "xt.err". They are used for debugging purposes.
  821.  
  822.  
  823. 11.  Using SIMTERM with Other Modems
  824.  
  825. SIMTERM has been tailored to work with the VENTEL or Hayes modem. If you 
  826. are using it with another modem then make sure that the modem is 
  827. optioned to present the `modem ready' signal. If you want to be able to 
  828. `dial' the phone number from the keyboard, you will also have to option 
  829. it to present the `carrier detect' signal. SIMTERM will not get past its 
  830. initialization code unless it see both the carrier detect and the modem 
  831. ready signals.
  832.  
  833. If you are using an acoustic coupler or a 212 `dial up', then when the 
  834. message `establish communications' appears, dial up the computer and 
  835. enable the `data' (e.g., hit the DATA button on the 212 or put the 
  836. receiver in the coupler).
  837.  
  838. If you are using any modem (or are directly connected), and SIMTERM 
  839. seems to hang right after the "Establish communications link" message, 
  840. it probably means that your modem (or local connection) is not 
  841. outputting the correct RS-232 signals for SIMTERM. If the equipment's 
  842. not yours, or you don't understand how to fix the problem, or you're 
  843. just too lazy to bother, try invoking SIMTERM with the -d flag. I.e. say 
  844. "simterm -d" instead of just "simterm". This will keep SIMTERM from 
  845. looking at the state of your modem, and your problem will disappear. If 
  846. it still doesn't work, you can always give us a call.
  847.  
  848. 12.  Compiling the Simulator
  849.  
  850. If you look at the link control file `simterm.lnk' you will see the 
  851.  
  852.  
  853. Copyright @ 1982,1984                 Jim & Eric Holtman
  854.  
  855.  
  856.  
  857.  
  858.  
  859. SIMTERM Instructions                                Page: 14
  860.  
  861.  
  862. programs that have to be compiled or assembled.  You must use the  MACRO 
  863. assembler (masm).  The file `struct.mac' has some macros for structured 
  864. assembly code which makes it easier to write. The file `mactest.asm' has 
  865. some examples of  the use of the structured  macros. The `relations' 
  866. between  variable or constants are the same as the conditional jumps  
  867. with the `j' removed. `long' can be appended to the macro to cause a 
  868. long jump to be generated.
  869.  
  870. `com.asm' is the interface to the Async Comm line. The file `comm.inc' 
  871. has the entry points defined. `xxgraph.asm' has functions for cursor 
  872. control and such from PASCAL programs. The file `graph.inc' has the 
  873. entry points defined.
  874.  
  875. `arglist.obj' and `arglist.inc' provide `argv' and `argc'  for the 
  876. parameters to the PASCAL program. See `mainsim.pas' for examples of 
  877. their use. Most of the program will be self-explanatory (hopefully). Any 
  878. questions, give me a call.
  879.  
  880. If you want to run SIMTERM on a PC with 128K, you will have to have 
  881. access to the compiler and macro assembler. Instead of re-compiling and 
  882. linking the programs in simterm.lnk, use "smterm.lnk". This will build a 
  883. SIMTERM without VenTel features and without Login Scripts, but it also 
  884. knocks about 50K off the `.exe' file.
  885.  
  886. 13.  Funny Error Conditions
  887.  
  888. Sometimes SIMTERM will appear to lockup and not accept any input from 
  889. the keyboard (you will hear the bell indicating that the  input buffer 
  890. is full). This is usually caused by an incomplete ESCAPE sequence that 
  891. has been sent to SIMTERM and it is waiting for the rest of the 
  892. characters, which will probably never come from the computer.  To `break 
  893. out' of this condition, depress at the same time the `Ctrl', `Shift', 
  894. and `Alt' keys on the left side of the keyboard. This will cause SIMTERM 
  895. to terminate its `wait state' and continue. This sometimes happens after 
  896. dialing into a BBS or other system since you might get some noise of the 
  897. line.
  898.  
  899. Also the transmitter may have missed an interrupt, you what you are 
  900. typing is not sent. If you suspect this, hit Alt-F7.
  901.  
  902. If SIMTERM gets into a funny condition that you can not get it  out of, 
  903. then terminate it with `Alt-F1' and then reinvoke it.  This procedure 
  904. will leave the PC attached to the system and you can pick up where you 
  905. left off.
  906.  
  907. There have been problems on some systems that use PROKEY, NEWKEY, or 
  908. other software that interprete the keyboard. If SIMTERM is locking up on 
  909. you and you have a program like this loaded, reboot the system without 
  910. it and try it. Whatever those programs are doing, they are not very 
  911. friendly to SIMTERM.
  912.  
  913.   Jim Holtman                             Eric Holtman
  914.   35 Dogwood Trail                        Watson Dorm, Room 142
  915.   Randolph, N. J.  07869                  Station #2
  916.   (201)-361-3395                          Charlottesville, VA 22904-0029
  917.  
  918.  
  919. Copyright @ 1982,1984                 Jim & Eric Holtman
  920.  
  921.  
  922.  
  923.  
  924.  
  925. SIMTERM Instructions                                Page: 15
  926.  
  927.  
  928.   Net Address:  ...!harpo!whuxlb!jph      ...!harpo!whuxle!eric
  929.  
  930. If you add any interesting new features to the program, please keep me 
  931. informed.
  932.  
  933. I have several other public domain programs that I will be  willing to 
  934. trade for ones that I don't have. Drop me a note (or a floppy disk) with 
  935. what you have and we can setup a trade. Changes and improvements are 
  936. continually being added to the program and if you are interested in what 
  937. the changes are, just drop me a note (or a floppy) for the latest 
  938. information.
  939.  
  940.  
  941.  
  942.  
  943.  
  944.  
  945.  
  946.  
  947.  
  948.  
  949.  
  950.  
  951.  
  952.  
  953.  
  954.  
  955.  
  956.  
  957.  
  958.  
  959.  
  960.  
  961.  
  962.  
  963.  
  964.  
  965.  
  966.  
  967.  
  968.  
  969.  
  970.  
  971.  
  972.  
  973.  
  974.  
  975.  
  976.  
  977.  
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985. Copyright @ 1982,1984                 Jim & Eric Holtman
  986.  
  987.  
  988.  
  989.  
  990.  
  991.